using UnityEngine;

public class ButOpticalAim : MonoBehaviour
{
	private void OnClick()
	{
		if (GameController.instance.playerScript != null && GameController.instance.playerScript.weaponManager.currentWeaponScript != null)
		{
			if (WalkWindow.instance.opticalAimHUD.modeAimActive)
			{
				GameController.instance.playerScript.HideOpticalAimer();
			}
			else
			{
				GameController.instance.playerScript.ShowOpticalAimer();
			}
		}
	}

	private void OnDisable()
	{
		FPSCamera.instance.OnExitSniperMode();
		TPSCamera.instance.OnExitSniperMode();
	}
}
